package com.gopay.common.core.dic.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.core.dic.dao.DicProvinceInfoDao;
/**
 * Created by Lenovo on 2017/1/17.
 */
@Repository("dicProvinceInfoDao")
public class DicProvinceInfoDaoImpl extends BaseDAOImpl<Object[],String> implements DicProvinceInfoDao {

    /* (non-Javadoc)
     * @see com.gopay.common.user.dao.DicProvinceInfoDao#getBankProvinceList()
     */
    @Override
    public List<Object[]> getBankProvinceList() {
        String hql = "SELECT PI.code,PI.name FROM  DicProvinceInfo PI WHERE 1=1";
        return findByHql(hql);
    }

    /* (non-Javadoc)
     * @see com.gopay.common.user.dao.DicProvinceInfoDao#getBankRegionList(java.lang.String)
     */
    @Override
    public List<Object[]> getBankRegionList(String BankProvinceCode) {
        String hql = "SELECT ci.code,ci.name FROM DicRegionInfo ci WHERE  ci.provinceCode =:provinceCode ";
        Map<String, Object> param = new HashMap<String, Object>();
        param.put("provinceCode", BankProvinceCode);
        return findByHql(hql, param);
    }

    /* (non-Javadoc)
     * @see com.gopay.common.user.dao.DicProvinceInfoDao#getBankProvinceName(java.lang.String)
     */
    @Override
    public String getBankProvinceName(String BankProvinceCode) {
        // TODO Auto-generated method stub
        return null;
    }

    /* (non-Javadoc)
     * @see com.gopay.common.user.dao.DicProvinceInfoDao#getBankCityName(java.lang.String)
     */
    @Override
    public String getBankCityName(String bankCityCode) {
        // TODO Auto-generated method stub
        return null;
    }

}
